package com.shine.icis.hbean;

import java.io.Serializable;
import java.text.DecimalFormat;
import java.util.Set;

import com.shine.icis.util.Tools;

public class DataCheckR13 implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 3662405149335236166L;
	private static final String chkTypeDesc0 = "报送日清算前核对";
	private static final String chkTypeDesc1 = "报送日清算后核对";
	
	//private DecimalFormat doubleFormat = new DecimalFormat("0.00");
	private DecimalFormat doubleFormat = new DecimalFormat("##,##0.00");
	private Integer id;
	private String chkType; //核对类型
	private String chkTypeDesc;//核对类型说明
	private double discAmt;//挪用金额
	private double reservesFactAmt; //T日客户自有资金实际划转金额
	private double fullComm;//T-1日证券公司向客户扣收的手续费
	private double accumAdjustAmt; //T-1日累计待调整自有收支
	private double sdcCommAmt;//T-1证券公司支付登记公司的一级费用(不含三板数据）
	private double bankComm;//T-1日银行收取的手续费
	private double bankInterest;//T-1证券公司客户资金存款账户收到的利息
	private double reservesInterest;//T-1证券公司客户资金交收账户收到的利息
	private double secInterest;//T-1证券公司向客户支付的结息金额
	private double withheldTaxAmt; //T-1日当日代扣代缴税费
	private double settleAdjustAmt; //T日当日交收当日已调整自有资金
	private double clearOffsetBal; //T-1日清算轧差
	private double stamptaxOffsetBal; //T-1日印花税轧差
	private double redBlueFillAmt; //T-1日红冲蓝补
	private double other1Amt; //其他费用1
	private double other2Amt; //其他费用2
	private double other3Amt; //其他费用3
	private double other4Amt; //其他费用4
	private String note;//备注
	private int busiDate;//数据日期
	private int operDate;//操作日期
	private int operTime;//操作时间
	
    private DataCheckR13 relateObj;//关联ID
	private Set<DataCheckR13> relateObjs;
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getChkType(){
		return chkType;
	}
	public void setChkType(String chkType){
		this.chkType = chkType;
	}
	public String getChkTypeDesc(){
		if (this.chkType.equals("0")){
			return chkTypeDesc0;
		}else{
			return chkTypeDesc1;
		}
	}
	//挪用金额
	public double getDiscAmt() {
		return discAmt;
	}
	public String getDiscAmtText() {
		return doubleFormat.format(discAmt);
	}
	public String getDiscAmtNote() {
		if (this.getModifyObj() == null) {
			return getDiscAmtText();
		}
		return getDiscAmtText() + " → " + this.getModifyObj().getDiscAmtText();
	}
	public void setDiscAmt(double discAmt) {
		this.discAmt = discAmt;
	}
	//T日客户自有资金实际划转金额
	public double getReservesFactAmt() {
		return reservesFactAmt;
	}
	public String getReservesFactAmtText() {
		return doubleFormat.format(reservesFactAmt);
	}
	public String getReservesFactAmtNote() {
		if (this.getModifyObj() == null) {
			return getReservesFactAmtText();
		}
		return getReservesFactAmtText() + " → " + this.getModifyObj().getReservesFactAmtText();
	}
	public void setReservesFactAmt(double reservesFactAmt) {
		this.reservesFactAmt = reservesFactAmt;
	}
	//T-1日证券公司向客户扣收的手续费
	public double getFullComm() {
		return fullComm;
	}
	public String getFullCommText() {
		return doubleFormat.format(fullComm);
	}
	public String getFullCommNote() {
		if (this.getModifyObj() == null) {
			return getFullCommText();
		}
		return getFullCommText() + " → " + this.getModifyObj().getFullCommText();
	}
	public void setFullComm(double fullComm) {
		this.fullComm = fullComm;
	}
	//T-1日累计待调整自有收支
	public double getAccumAdjustAmt() {
		return accumAdjustAmt;
	}
	public String getAccumAdjustAmtText() {
		return doubleFormat.format(accumAdjustAmt);
	}
	public String getAccumAdjustAmtNote() {
		if (this.getModifyObj() == null) {
			return getAccumAdjustAmtText();
		}
		return getAccumAdjustAmtText() + " → " + this.getModifyObj().getAccumAdjustAmtText();
	}
	public void setAccumAdjustAmt(double accumAdjustAmt) {
		this.accumAdjustAmt = accumAdjustAmt;
	}
	//T-1证券公司支付登记公司的一级费用(不含三板数据）
	public double getSdcCommAmt() {
		return sdcCommAmt;
	}
	public String getSdcCommAmtText() {
		return doubleFormat.format(sdcCommAmt);
	}
	public String getSdcCommAmtNote() {
		if (this.getModifyObj() == null) {
			return getSdcCommAmtText();
		}
		return getSdcCommAmtText() + " → " + this.getModifyObj().getSdcCommAmtText();
	}
	public void setSdcCommAmt(double sdcCommAmt) {
		this.sdcCommAmt = sdcCommAmt;
	}
	//T-1日银行收取的手续费
	public double getBankComm() {
		return bankComm;
	}
	public String getBankCommText() {
		return doubleFormat.format(bankComm);
	}
	public String getBankCommNote() {
		if (this.getModifyObj() == null) {
			return getBankCommText();
		}
		return getBankCommText() + " → " + this.getModifyObj().getBankCommText();
	}
	public void setBankComm(double bankComm) {
		this.bankComm = bankComm;
	}
	//T-1证券公司客户资金存款账户收到的利息
	public double getBankInterest() {
		return bankInterest;
	}
	public String getBankInterestText() {
		return doubleFormat.format(bankInterest);
	}
	public String getBankInterestNote() {
		if (this.getModifyObj() == null) {
			return getBankInterestText();
		}
		return getBankInterestText() + " → " + this.getModifyObj().getBankInterestText();
	}
	public void setBankInterest(double bankInterest) {
		this.bankInterest = bankInterest;
	}
	//T-1证券公司客户资金存款账户收到的利息
	public double getReservesInterest() {
		return reservesInterest;
	}
	public String getReservesInterestText() {
		return doubleFormat.format(reservesInterest);
	}
	public String getReservesInterestNote() {
		if (this.getModifyObj() == null) {
			return getReservesInterestText();
		}
		return getReservesInterestText() + " → " + this.getModifyObj().getReservesInterestText();
	}
	public void setReservesInterest(double reservesInterest) {
		this.reservesInterest = reservesInterest;
	}
	//T-1证券公司向客户支付的结息金额
	public double getSecInterest() {
		return secInterest;
	}
	public String getSecInterestText() {
		return doubleFormat.format(secInterest);
	}
	public String getSecInterestNote() {
		if (this.getModifyObj() == null) {
			return getSecInterestText();
		}
		return getSecInterestText() + " → " + this.getModifyObj().getSecInterestText();
	}
	public void setSecInterest(double secInterest) {
		this.secInterest = secInterest;
	}
	//T-1日当日代扣代缴税费
	public double getWithheldTaxAmt() {
		return withheldTaxAmt;
	}
	public String getWithheldTaxAmtText() {
		return doubleFormat.format(withheldTaxAmt);
	}
	public String getWithheldTaxAmtNote() {
		if (this.getModifyObj() == null) {
			return getWithheldTaxAmtText();
		}
		return getWithheldTaxAmtText() + " → " + this.getModifyObj().getWithheldTaxAmtText();
	}
	public void setWithheldTaxAmt(double withheldTaxAmt) {
		this.withheldTaxAmt = withheldTaxAmt;
	}
	//T日当日交收当日已调整自有资金
	public double getSettleAdjustAmt() {
		return settleAdjustAmt;
	}
	public String getSettleAdjustAmtText() {
		return doubleFormat.format(settleAdjustAmt);
	}
	public String getSettleAdjustAmtNote() {
		if (this.getModifyObj() == null) {
			return getSettleAdjustAmtText();
		}
		return getSettleAdjustAmtText() + " → " + this.getModifyObj().getSettleAdjustAmtText();
	}
	public void setSettleAdjustAmt(double settleAdjustAmt) {
		this.settleAdjustAmt = settleAdjustAmt;
	}
	//T-1日清算轧差
	public double getClearOffsetBal() {
		return clearOffsetBal;
	}
	public String getClearOffsetBalText() {
		return doubleFormat.format(clearOffsetBal);
	}
	public String getClearOffsetBalNote() {
		if (this.getModifyObj() == null) {
			return getClearOffsetBalText();
		}
		return getClearOffsetBalText() + " → " + this.getModifyObj().getClearOffsetBalText();
	}
	public void setClearOffsetBal(double clearOffsetBal) {
		this.clearOffsetBal = clearOffsetBal;
	}
	//T-1日印花税轧差
	public double getStamptaxOffsetBal() {
		return stamptaxOffsetBal;
	}
	public String getStamptaxOffsetBalText() {
		return doubleFormat.format(stamptaxOffsetBal);
	}
	public String getStamptaxOffsetBalNote() {
		if (this.getModifyObj() == null) {
			return getStamptaxOffsetBalText();
		}
		return getStamptaxOffsetBalText() + " → " + this.getModifyObj().getStamptaxOffsetBalText();
	}
	public void setStamptaxOffsetBal(double stamptaxOffsetBal) {
		this.stamptaxOffsetBal = stamptaxOffsetBal;
	}
	//T-1日红冲蓝补
	public double getRedBlueFillAmt() {
		return redBlueFillAmt;
	}
	public String getRedBlueFillAmtText() {
		return doubleFormat.format(redBlueFillAmt);
	}
	public String getRedBlueFillAmtNote() {
		if (this.getModifyObj() == null) {
			return getRedBlueFillAmtText();
		}
		return getRedBlueFillAmtText() + " → " + this.getModifyObj().getRedBlueFillAmtText();
	}
	public void setRedBlueFillAmt(double redBlueFillAmt) {
		this.redBlueFillAmt = redBlueFillAmt;
	}
	//其他费用1
	public double getOther1Amt() {
		return other1Amt;
	}
	public String getOther1AmtText() {
		return doubleFormat.format(other1Amt);
	}
	public String getOther1AmtNote() {
		if (this.getModifyObj() == null) {
			return getOther1AmtText();
		}
		return getOther1AmtText() + " → " + this.getModifyObj().getOther1AmtText();
	}
	public void setOther1Amt(double other1Amt) {
		this.other1Amt = other1Amt;
	}
	//其他费用2
	public double getOther2Amt() {
		return other2Amt;
	}
	public String getOther2AmtText() {
		return doubleFormat.format(other2Amt);
	}
	public String getOther2AmtNote() {
		if (this.getModifyObj() == null) {
			return getOther2AmtText();
		}
		return getOther2AmtText() + " → " + this.getModifyObj().getOther2AmtText();
	}
	public void setOther2Amt(double other2Amt) {
		this.other2Amt = other2Amt;
	}
	//其他费用3
	public double getOther3Amt() {
		return other3Amt;
	}
	public String getOther3AmtText() {
		return doubleFormat.format(other3Amt);
	}
	public String getOther3AmtNote() {
		if (this.getModifyObj() == null) {
			return getOther3AmtText();
		}
		return getOther3AmtText() + " → " + this.getModifyObj().getOther3AmtText();
	}
	public void setOther3Amt(double other3Amt) {
		this.other3Amt = other3Amt;
	}
	//其他费用4
	public double getOther4Amt() {
		return other4Amt;
	}
	public String getOther4AmtText() {
		return doubleFormat.format(other4Amt);
	}
	public String getOther4AmtNote() {
		if (this.getModifyObj() == null) {
			return getOther4AmtText();
		}
		return getOther4AmtText() + " → " + this.getModifyObj().getOther4AmtText();
	}
	public void setOther4Amt(double other4Amt) {
		this.other4Amt = other4Amt;
	}
	//备注
	public String getNote() {
		return note;
	}
	public void setNote(String note) {
		this.note = note;
	}

	public int getBusiDate() {
		return busiDate;
	}
	public void setBusiDate(int busiDate) {
		this.busiDate = busiDate;
	}
	public int getOperDate() {
		return operDate;
	}
	public void setOperDate(int operDate) {
		this.operDate = operDate;
	}
	public int getOperTime() {
		return operTime;
	}
	public void setOperTime(int operTime) {
		this.operTime = operTime;
	}
	
	public DataCheckR13 getRelateObj() {
		return relateObj;
	}
	public void setRelateObj(DataCheckR13 relateObj) {
		this.relateObj = relateObj;
	}
	
	public Set<DataCheckR13> getRelateObjs() {
		return relateObjs;
	}
	public void setRelateObjs(Set<DataCheckR13> relateObjs) {
		this.relateObjs = relateObjs;
	}
	
	public String getFormatOperTime() {
		StringBuffer sb = new StringBuffer();
		sb.append(operDate);
		if (sb.length() != 8) {
			return "";
		}
		sb.insert(6, "-").insert(4, "-");
		//121200 -> 12:12:00
		StringBuffer sbt = new StringBuffer();
		sbt.append(Tools.getFixedNum(operTime, 6));
		sbt.insert(4, ":").insert(2, ":").toString();
		
		return sb.append(" ").append(sbt).toString();
	}
	
	public DataCheckR13 getModifyObj() {
		if (relateObjs == null || relateObjs.isEmpty()) {
			return null;
		}
		return relateObjs.iterator().next();
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final DataCheckR13 other = (DataCheckR13) obj;
		if (id == null) {
//			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		return true;
	}

	
	
	
}
